<?php
	header("Content-type: text/html; charset=utf-8");
	$user = $_POST["user"];
	$password = $_POST["password"];


	$conn = mysql_connect("localhost:3306","root","root");

	mysql_select_db("ds",$conn);

	mysql_query("set names utf8");

	$sql = "INSERT INTO user (user,password) VALUES ('$user','$password')";

	$result = mysql_query($sql);

	if($result){
		echo json_encode(array('status'=>"success"));
	}else{
		echo json_encode(array('status'=>"error"));
	}

	mysql_close($conn);

?>